Skip to content

refactor(objectql): split registry.ts into section modules by codemod (split 1 of 8), a move with the public exports unchanged - #34285

Merged
os-zhuang merged 16 commits into
mainfrom
claude/area-E1-33949-registry
Nov 16, 2026
Merged

os-zhuang merged 16 commits into
mainfrom
claude/area-E1-33949-registry

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread

Part of #33949. This PR is split 1 of 8 under ruling item 1: packages/objectql/src/registry.ts. It also adds the split facade's line ceiling, as ruling item 2 and the ceiling gate from #34103 require. It follows the maintainer rule for splits (#33949 comment 6911407209): the split script is not committed, the PR body carries its proof readings, and the net growth is accounted for per file. The other seven splits stay open on the card.

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:把 objectql 的 registry.ts(12,577 行)按章节拆成 13 个模块,registry.ts 留作转发入口,剩 6,326 行,并按裁决第 2 条给它登记行数上限 6,426(6,326 + 100)。对外导出一个不少,类型/值种类不变,只是代码搬家,不改任何行为。拆分脚本不进仓库,只留在本分支历史(b89e3e42b8)里供核验。
  • 为什么改:落实 [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 裁决第 1 条「热点文件逐个拆分,registry.ts 第一个」。这个文件是并发 PR 冲突最多的地方之一,拆开后各改各的模块。
  • 风险与回滚:风险在「搬家是否真的一字不差」。历史里的脚本证明了两件事:200 个方法体和 127 个顶层声明与 main 上逐字节相同;registry.ts 的 68 个导出名与种类不变。净增约 2,650 行,下文「Growth account」逐文件列出来源。回滚就是 revert 本 PR。
  • 先看:① 下文「Growth account」表(净增从哪来);② scripts/facade-delegation-registry.json 新增的 1 行 facade、15 行例外(没搬的成员及原因)和 1 行上限;③ packages/objectql/src/registry.ts 的转发形态。
  • 两分钟验证:在本分支根目录执行 git show b89e3e42b8:scripts/codemod-split-registry.mjs > scripts/codemod-split-registry.mjs; node scripts/codemod-split-registry.mjs --verify --base $(git merge-base HEAD origin/main); echo exit=$?; rm scripts/codemod-split-registry.mjs。预期看到 byte-identity: 200/200 … 127/127 … identical 与 exports-equality: equal,外加恰好一行 ✗,说 registry-facet-hosts.ts 与生成稿不同,因此 exit=1。原因是该文件头注释在脚本删除后改了措辞,而脚本对这个文件做整文件比对;原因与对照证明见 Tests。
  • 需要你做的:Tier H(超过 3,000 行),需要维护者批准合并。

What changes

registry.ts is split by a codemod: pass 1 of the engine.ts split codemod, re-targeted at SchemaRegistry, plus an exports-equality proof. Following the maintainer rule, the script is not in this PR's tree. It lives in this branch's history: it was added in 4001a5c559, last changed in c92a4d31b4, and deleted in 08a3d7ae79. Read it with git show b89e3e42b8:scripts/codemod-split-registry.mjs (blob eb7cc556a0). It has to run from the repo's scripts/ directory, because it imports the sibling helpers invoked-as.mjs and ts-parse.mjs and resolves the repo root from its own path.

  • Facets. 200 of the 215 class methods move to a facet class in one of 11 section modules. The section anchors are the existing section banners, so each module is one banner's methods. SchemaRegistry keeps every member's signature and docblock, and each moved method is a one-call stub: Facet.name.call(FacetHost.of(this), …). registry-facet-hosts.ts declares a host per facet and the class installs them in a static block, so a facet reads private state only through its host.
  • Top level. 127 of the 161 top-level declarations ahead of the class move whole into registry-top-level.ts. registry.ts re-exports by name every one it exported before.
  • Stays. 15 methods and 34 top-level declarations stay in registry.ts. Each method that stays is a row in scripts/facade-delegation-registry.json exceptions, citing [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 with its stay reason (bare this, inferred return type, a parameter that shadows a moved name, a computed name, the constructor). That is the same shape the engine.ts split left for its members pass.
  • Path readers. Four declarations stay in registry.ts because a reader looks for them in that file by path: mergeObjectDefinitions and isShareableNamespace (ADR symbol anchors), REGISTRY_LOG_LEVELS (check:registry-log-declared and check:rest-log-declared read it from registry.ts), and TENANT_SCOPE_INDEX (an ADR-0117 registry.ts#organization_id token). So the ADRs and the two gates are untouched.
  • Facade registration. scripts/facade-delegation-registry.json registers registry.ts / SchemaRegistry as a facade, so check:facade-delegation-only holds it to delegation from here on. DECLARED_WATCH_HINTS in that gate names the file.
  • Line ceiling. ceilings gains { file: registry.ts, baseLines: 6326, baseCommit: c27f4ab0d6, maxLines: 6426, ruling: 6897467376 }. c27f4ab0d6 is the regeneration commit: the merge of origin/main f9120b8692, with the split regenerated on it. The rewording commit changed no line of registry.ts (still 6,326 lines), so the row stands.
  • Wording. The 13 module headers, the changeset and the 15 exceptions reasons cite "the [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 split codemod (PR refactor(objectql): split registry.ts into section modules by codemod (split 1 of 8), a move with the public exports unchanged #34285, kept in its branch history, not committed)" instead of a script path. They change comments and text only: across packages/objectql/src, 36 changed lines between b89e3e42b8 and this head, every one a * or // comment line.
  • Changeset. @objectstack/objectql patch, a move only.

Growth account

The diff is +9,762 / −7,105, a net of +2,657. Per file (git diff --numstat $(git merge-base HEAD origin/main) HEAD):

part added removed net
registry.ts, the facade side: stubs, section comments, imports, the re-export list, the static host block 849 7,100 −6,251
the 13 new modules (moved text plus their overhead, table below) 8,780 0 +8,780
scripts/facade-delegation-registry.json (1 facade row, 15 exception rows, 1 ceiling row) 117 0 +117
.changeset/33949-registry-split.md 10 0 +10
scripts/check-facade-delegation-only.mjs (one watch hint) 1 0 +1
federated-injected-column-readers.test.ts (5 keys re-keyed) 5 5 0
total 9,762 7,105 +2,657

So the split code itself grows by +2,529 (8,780 − 6,251):

  • Facade stubs: +849. These are all the lines added to registry.ts. The codemod's own plan counts 800 of them as stub lines (each moved method keeps its signature, gains a marker comment and becomes a one-call forward) and 22 as import lines; the rest are section comments, the re-export list and the static host block. The plan reading is total: 200/215 methods move into 11 module(s): 3799 body lines out, 800 stub lines in, plus 22 import lines.
  • Module overhead: +1,680. This is the module lines minus the lines registry.ts gave up (8,780 − 7,100). Per module, the lines that are not moved text are 1,818: 459 header lines, 156 import lines and 1,203 lines of facet wrapper, duplicated signatures (a facet's static method repeats the signature the stub keeps) and the host interfaces. Against that, 138 lines deleted from registry.ts reappear in no module (mostly the blank and signature lines the stubs replace). 1,818 − 138 = 1,680.
module lines moved text header imports wrapper, signatures, host, blank growth
registry-apps.ts 216 145 33 3 35 71
registry-bare-names.ts 377 290 37 8 42 87
registry-facet-hosts.ts 69 10 19 12 28 59
registry-items.ts 351 265 34 12 40 86
registry-namespaces-and-claims.ts 520 400 41 14 65 120
registry-object-registration.ts 1,638 1,375 47 30 186 263
registry-package-addressing.ts 832 669 41 15 107 163
registry-packages.ts 709 564 38 15 92 145
registry-picklists.ts 505 341 41 9 114 164
registry-platform-global.ts 764 575 43 7 139 189
registry-restore.ts 363 244 37 9 73 119
registry-storage.ts 187 100 34 3 50 87
registry-top-level.ts 2,249 1,984 14 19 232 265
total 8,780 6,962 459 156 1,203 1,818
How each figure was counted
  • The per-file added/removed lines and the total come from git diff --numstat $(git merge-base HEAD origin/main) HEAD.
  • The module table comes from the script below, run from the repo root.
    • header is the lines before the first import.
    • imports is the lines inside import statements.
    • moved text is the module lines that match, as a multiset, a line deleted from registry.ts in git diff MERGE_BASE HEAD -- packages/objectql/src/registry.ts.
    • wrapper, signatures, host, blank is everything else.
    • The multiset match is per line, so a common line such as } can be credited to whichever module meets it first. The per-module split of moved text against overhead is approximate. The totals are exact.
  • The stub reading is the codemod's plan output on f9120b8692's registry.ts, from the history copy of the script.
# save as growth.py, then run: python3 growth.py $(git merge-base HEAD origin/main)
import subprocess, sys, collections
mb = sys.argv[1]
git = lambda *a: subprocess.run(['git', *a], capture_output=True, text=True, check=True).stdout
src = 'packages/objectql/src/'
d = git('diff', mb, 'HEAD', '--', src + 'registry.ts').splitlines()
deleted = collections.Counter(l[1:] for l in d if l.startswith('-') and not l.startswith('---'))
mods = sorted(f for f in git('diff', '--name-only', '--diff-filter=A', mb, 'HEAD', '--', src).split() if not f.endswith('.test.ts'))
for f in mods:
    lines = open(f).read().split('\n')[:-1]
    first = next((i for i, l in enumerate(lines) if l.startswith('import ')), len(lines))
    imports = moved = other = 0; in_imp = False
    for i, l in enumerate(lines):
        if i < first: continue
        if l.startswith('import ') or in_imp:
            imports += 1; in_imp = not l.rstrip().endswith(';'); continue
        if deleted[l] > 0: deleted[l] -= 1; moved += 1
        else: other += 1
    print(f, len(lines), moved, first, imports, other, len(lines) - moved)
print('deleted from registry.ts, found in no module:', sum(deleted.values()))

Open PRs that touch registry.ts

Measured at 2026-11-16T05:51Z over all 62 open PRs, through the paginated REST files list: no open PR other than this one touches registry.ts.

Earlier overlaps are all already inside the split. #34036 (+45 / −1) merged at 19:50Z, #34156 (+73 / −7) at 01:46Z, and #34224 (+31 / −2) after that. The split is regenerated on origin/main f9120b8692, which contains all three.

Tests

The split's proofs (the script from branch history)

Last run with the script in the tree, on b89e3e42b8, from the repo root:

$ node scripts/codemod-split-registry.mjs --verify --base $(git merge-base HEAD origin/main)    # f9120b8692
byte-identity: 200/200 moved bodies identical to base (body, parameters, return type, async); 127/127 moved top-level declarations identical to base (leading comments included); registry.ts 12577 -> 6326 lines; undoing the split does rebuild the base byte-for-byte once the 63 import binding(s) only moved text reads are pruned from the base (…63 names…)
exports-equality: equal — registry.ts exports 68 name(s) at base (55 value(s), 13 type(s)); the split exports every one, each the same kind, plus 10 generated name(s) (lever (a), the statics route) (NOT_A_PAIR_ROW_OF_A_HOLDER, RegistrationRestorePoint, TENANT_SCOPE_INDEX, ValidationRuleCopyRefusedError, actionHoldersOnOwnerKeyOf, declaredOverrideBase, isShareableNamespace, mergeObjectDefinitions, pairRowDeclaresAnotherHolder, provisionTenantScopeIndex), which no module re-exports with `export *`
exit 0

$ node scripts/codemod-split-registry.mjs --self-test
✓ codemod-split-registry self-test: 74 cases in 7 batteries pass.
exit 0

Re-run on this head (e06e1a9d53, after the deletion and the rewording), with the history copy put back at scripts/codemod-split-registry.mjs for the run and removed afterwards. Its blob is eb7cc556a0, the same bytes as above.

$ git show b89e3e42b8:scripts/codemod-split-registry.mjs > scripts/codemod-split-registry.mjs
$ node scripts/codemod-split-registry.mjs --verify --base $(git merge-base HEAD origin/main)    # f9120b8692
byte-identity: 200/200 moved bodies identical to base (body, parameters, return type, async); 127/127 moved top-level declarations identical to base (leading comments included); registry.ts 12577 -> 6326 lines; …
exports-equality: equal — registry.ts exports 68 name(s) at base (55 value(s), 13 type(s)); the split exports every one, each the same kind, plus 10 generated name(s) …
  ✗ registry-facet-hosts.ts is not the generated host module for the facets on disk
exit 1
$ node scripts/codemod-split-registry.mjs --self-test
✓ codemod-split-registry self-test: 74 cases in 7 batteries pass.
exit 0

What the proof compares and what it ignores, plainly:

  • registry.ts is checked whole: undoing the split must rebuild the base byte for byte. The rewording changed no line of it.
  • Each facet module is checked on its facet class: every static method must be a moved body, byte-identical. The text outside that class is not compared: the header comment, the imports and the host interface.
  • The leaf module registry-top-level.ts is checked statement by statement: each moved declaration, with its leading comments, must be byte-identical. The header comment before the first statement is not compared.
  • registry-facet-hosts.ts is compared whole against what the script generates. So the reworded header comment of that file is the one ✗ above.

Control leg. On the same head, with only registry-facet-hosts.ts put back to its b89e3e42b8 bytes (blob 9b780d1060; its diff to this head is the 3-line header comment and nothing else), the same command gives exit 0. The file was then restored to HEAD (blob 8cca5ac880), and git diff HEAD was empty. So the twelve other reworded headers are outside what the proof compares, and the one ✗ is that header and nothing else.

Ablation of the exports-equality proof (a reading against the history sha)

The ablation was run while the script was in the tree, on the same blob eb7cc556a0 that git show b89e3e42b8:scripts/codemod-split-registry.mjs returns today. Each leg went through scripts/ablation-replace.mjs; each restore was proven blob == HEAD with git diff HEAD empty.

Readings
anchor  if (!lever.has(name)) failures.push(
  ->    if (false && !lever.has(name)) failures.push(
  ok mutation landed: anchor 1 -> 0, blob eb7cc556a0b3 -> 3e38bed8d102
  ✗ [exports-equality (Proof 2)] a new export outside the lever-(a) statement fails
  ✗ codemod-split-registry self-test: 1 failure(s) (cases and floor).
  ok restored: blob == HEAD (eb7cc556a0b3) and `git diff HEAD` is empty

anchor  if (!after.has(name)) failures.push(
  ->    if (false && !after.has(name)) failures.push(
  ok mutation landed: anchor 1 -> 0, blob eb7cc556a0b3 -> db872683c030
  ✗ [exports-equality (Proof 2)] a base export the split no longer exports fails
  ✗ codemod-split-registry self-test: 1 failure(s) (cases and floor).
  ok restored: blob == HEAD (eb7cc556a0b3) and `git diff HEAD` is empty

Package tests

  • objectql, pnpm --filter @objectstack/objectql test: 599/599 test files and 13,366/13,366 tests pass on b89e3e42b8 (lock VERDICT command-exit 0). The commits after it change comments, text and the deleted script only.
  • Direct dependents (11 packages: cli, cloud-connection, plugin-audit, plugin-dev, plugin-email, plugin-pinyin-search, plugin-sharing, plugin-webhooks, runtime, service-automation, verify). Typecheck passes on b89e3e42b8 for objectql and all 11 (75/75 tasks). Their tests ran on the earlier split heads 3683e1eb53 and 537121403d: the runtime suite, and the cli unit tier (--project unit) at 423/423 files and 6,010/6,010 tests. This is a declared narrowing; CI runs them in full.
  • One test changed. federated-injected-column-readers.test.ts keys each reader as FILE#FUNCTION :: column. Five keys follow their function to its new file: three to registry-top-level.ts and two to registry-platform-global.ts. The organization_id row stays at registry.ts, where TENANT_SCOPE_INDEX is pinned. No assertion changed.

Acceptance notes

Verification

Head e06e1a9d53. It is the regeneration merge c27f4ab0d6 (origin/main f9120b8692) plus three commits: the ceiling row (b89e3e42b8), the script's deletion (08a3d7ae79) and the comment-only rewording (e06e1a9d53).

On b89e3e42b8 (the last code change; the two later commits change comments, text and the deleted script only), all under os-verify-lock with VERDICT command-exit 0:

  • objectql tests: 599/599 files, 13,366/13,366 tests.
  • typecheck of objectql and its 11 direct dependents: 75/75 tasks.
  • pnpm check:facade-delegation-only: self-test 44 cases, then the gate. It reads registry.ts: 6326 lines, ceiling 6426 (100 left).
  • The dispatch-gates union: 93 families, every one exit 0, reconciled as 93 run, 0 NOT-MEASURED.
  • CI on b89e3e42b8: 51 check-runs, 35 success, 16 skipped, 0 failure.

On e06e1a9d53: NOT MEASURED. A maintainer order (09:01Z) stopped the run before it got the verify lock. These gates were not run on this head: objectql typecheck, federated-injected-column-readers.test.ts, check:facade-delegation-only, check:adr-symbol-anchors, eslint on the touched files, and the dispatch-gates union. Derived for this head, the union is the same 93 families as on b89e3e42b8. What was run on this head is the split proof in Tests: byte-identity 200/200 and 127/127, exports-equality equal over 68 names. Also a check that every changed line in packages/objectql/src since b89e3e42b8 is a comment line (36 lines, 0 non-comment). CI on this head is the reading to take.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ

…runnable command

The first pass of codemod-split-engine.mjs, copied with its host
parameterised (registry.ts, SchemaRegistry, registry-*, #33949) and
an exports-equality proof added beside its byte-identity proof.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… (move-only)

Generated by node scripts/codemod-split-registry.mjs --write on a
branch cut from origin/main; never hand-edited.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…plit moved

Six READERS rows named registry.ts sites that the split moved, unedited,
into registry-top-level.ts and registry-platform-global.ts.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…y split's changeset

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…ons in registry.ts

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
node scripts/codemod-split-registry.mjs --write on registry.ts at
86350e1, after the open PR that touched it merged.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…its two path readers look, and regenerates

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…e the split now keeps it

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… split on it

registry.ts took a 73-line change on main; the split is regenerated from
main's registry.ts with node scripts/codemod-split-registry.mjs --write.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/objectql, touching 620 documentable anchor(s).

81 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 7d06248d923d21d9cc453442ca89c324bd0304c0.

⛔ 20 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 5 anchor(s) matched too much of the corpus to be a work list: objectName (symbol, 58 pages), objectName (literal, 58 pages), organization_id (literal, 41 pages), sys_user (literal, 55 pages), /meta/:type/:name (route, 49 pages)
  • 34 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 21 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 7d06248d923d21d9cc453442ca89c324bd0304c0 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from b59ae5410c7b6ce69f1b9ed68d74267ab7191f07 — the merge of head e06e1a9d536524d73485a1c916f14f8db52c7c4a into base 7d06248d923d21d9cc453442ca89c324bd0304c0, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin b59ae5410c7b6ce69f1b9ed68d74267ab7191f07 && git checkout b59ae5410c7b6ce69f1b9ed68d74267ab7191f07
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7d06248d923d21d9cc453442ca89c324bd0304c0 e06e1a9d536524d73485a1c916f14f8db52c7c4a && git checkout -B drift-repro 7d06248d923d21d9cc453442ca89c324bd0304c0 && git merge --no-ff e06e1a9d536524d73485a1c916f14f8db52c7c4a

node scripts/docs-audit/affected-docs.mjs --json 7d06248d923d21d9cc453442ca89c324bd0304c0

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 7d06248d923d21d9cc453442ca89c324bd0304c0 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

… split on it

registry.ts changed on main; the split is regenerated from main's
registry.ts with node scripts/codemod-split-registry.mjs --write.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
…ed at the regeneration commit plus the margin

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review claim · head b89e3e4 · 2026-11-16T07:47Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jTyY9BGjj9WBi7QgH6

Review — PASS

Head-sha: b89e3e42b87c2dc1766fbc3ff331de64434175b4

L1 ordinary ACCEPT read (no contract face: Clause-②: no, Metadata-protocol: none).

  1. CI green at the head. Latest run per check: 33 success, 18 skipped, none failing or pending; mergeable_state: clean.
  2. Declarations match the diff. The changeset is @objectstack/objectql: patch, a move only, with Clause-②: no and Metadata-protocol: none. The diff touches only packages/objectql/src/ (registry.ts and 13 new registry-*.ts modules), one test's row keys, and three scripts files. No spec, protocol or exported-surface file moves, so patch is right.
  3. The facade shape holds. registry.ts is 6,326 lines, which matches the ceiling row (baseLines 6326, maxLines 6426, ruling 6897467376). It has 200 facet calls: 184 stubs of the form XFacet.m.call(xHost.of(this), …), and 16 this-free static bodies called directly (tenantAuthoredScalars, validate, findNavGroup, and others). registry-facet-hosts.ts builds one host per registry in a WeakMap, installed from the class's static {} block. The facet modules import registry.ts for types only, so there is no evaluation cycle. Methods reach the host as closures ((...a) => registry.m(...a)) and fields as getters, so an instance spy or subclass override is still the one reached.
  4. The 15 exceptions are each named and justified. The 15 SchemaRegistry rows in facade-delegation-registry.json are first-pass stays: the constructor, eight bare-this bodies, two computed-default signatures, one symbol key, two inferred-return-type methods (moving them would change the .d.ts), and one parameter shadow. The facade is registered under [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949, and check-facade-delegation-only.mjs adds registry.ts to DECLARED_WATCH_HINTS.
  5. The one test change is a re-key only. federated-injected-column-readers.test.ts moves 5 rows from registry.ts#… to registry-top-level.ts#… or registry-platform-global.ts#…. Every disposition and why is unchanged, and the readers moved with the bodies.
  6. No main drift is lost. Since the merge base (f9120b8), main changed nothing in registry.ts, the test, or either facade script. Its two later objectql commits (perf(objectql)!: a cascade delete removes a relation's children as one predicate delete per chunk #33887, fix(metadata-protocol,rest,runtime)!: a name only disabled packages hold answers 404 at _env, and its package-less customization is withheld (ADR-0150 D3, D4) #33995) touch other files. git merge-tree against origin/main is clean.
  7. Patch-id (own diff from the merge base): a15e22ed0da96773c54a310e5e949e7235b4d548. A clean main merge carrying this patch-id keeps this PASS.
  8. The proofs were not re-run locally. This checkout has no install, so I did not run the codemod's --verify --base (byte-identity 200/200 and 127/127, exports-equality over 68 names) or its 74-case self-test. This read rests on the green objectql suite and typecheck at the head, plus the spot-reads above.

Tier H by size (+12,829/−7,105): this goes to the seat for the hand-off. The area does not arm it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRsWwTRkuRCyQwvpAG

维护者速读

Head-sha: b89e3e42b87c2dc1766fbc3ff331de64434175b4

  • 改了什么:用脚本 scripts/codemod-split-registry.mjs 把 objectql 的 registry.ts 按章节拆进 13 个模块。registry.ts 从 12,577 行降到 6,326 行,只负责转发,并登记了行数上限 6,426。纯搬家:对外导出一个不少、种类不变,行为不变。
  • 为什么改:落实 [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 裁决第 1 条(热点文件用 codemod 逐个拆,registry.ts 排第一)。这个文件是并发 PR 冲突最多的地方之一,拆开后各改各的模块。共 8 次拆分,这是第 1 次。
  • 风险与回滚:风险只在"搬家是否一字不差"。席位已在本地重跑脚本自证:方法体 200/200、顶层声明 127/127 与基线逐字节相同,68 个导出名及其种类相同。回滚就是 revert 本 PR。
  • 先看:① scripts/facade-delegation-registry.json 新增的 facade 登记和 15 条例外;② packages/objectql/src/registry.ts 的转发写法;③ 唯一改动的测试 federated-injected-column-readers.test.ts,5 个键随文件改名。
  • 两分钟验证:node scripts/codemod-split-registry.mjs --verify --base $(git merge-base HEAD origin/main),预期 byte-identity: 200/200 … identical 和 exports-equality: equal,退出码 0。
  • 需要你做的:改动超过 3,000 行,按规则要你批准。请对 head b89e3e42 点 Approve(L1 普通审核 PASS 6910597882;没有契约面,不需要 L2)。批准后由席位落地。

席位意见:建议批准。这是机械搬家,有字节级自证,L1 唯一没做到的本地重跑,席位已经补上。拖久了 main 一旦改到 registry.ts 就得重新生成,现在合并成本最低。

席位核对

  1. 形态:19 个文件,+12,829/−7,105,超过 3,000 行。check-governed-merges --pr 34285 没有命中受管路径,按体量进入人工合并或授权批准档。changeset 为 @objectstack/objectql patch;Clause-②: no,Metadata-protocol: none。
  2. 前提实测:席位在本 head 的独立工作树里跑 codemod-split-registry.mjs --verify --base <merge-base>,退出码 0。byte-identity 200/200 和 127/127;exports-equality equal,68 个名字(55 值、13 类型)。另有 10 个生成的名字只从 registry.ts 模块导出,没有任何模块用 export * 再导出,所以包的公共面不变。
  3. 门禁 check-runs:head b89e3e42 上 37 success、18 skipped、0 failure;mergeable clean。
  4. 接受的偏差:只拆了 8 份中的第 1 份,其余 7 份留在 [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949。15 个方法和 34 个顶层声明按脚本列出的原因留在 registry.ts,每条都有例外登记。
  5. 范围外去向:[Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 保持打开,承接拆分 2–8。重新生成的步骤见 [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 交接评论 6910609756。落地时 main 若已改到 registry.ts,就按该步骤重新生成,不手工合并。
  6. 落地条款:等 GOVERNED_APPROVERS 的账号 APPROVED(或维护者直接合并)。获批后,席位重做落地前检查:K(当前 14)、merge-tree、patch-id a15e22ed。然后清除 pm:awaiting-merge、转 ready、开 auto-merge。head 若再变动,撤掉标签,回到等待。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 16, 2026
@os-zhuang

Copy link
Copy Markdown
Contributor

你只是分拆文件,为什么会多出5000行?

1 similar comment
@os-zhuang

Copy link
Copy Markdown
Contributor

你只是分拆文件,为什么会多出5000行?

…script lives in branch history only

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
… reasons cite the split's PR instead of a script path

Comments and text only; no code moves.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5obaLbqgzRUR9xXfft

Final head declared · PR #34285 (#33949 split 1 of 8, registry.ts) · area o1-D · 2026-11-16T10:17Z
Head-sha: e06e1a9d536524d73485a1c916f14f8db52c7c4a

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5mww9UksbwbjvM4aYn

席位核对 · PR #34285 · L1-b · 2026-11-16T10:27Z

Head-sha: e06e1a9d536524d73485a1c916f14f8db52c7c4a

L1 delta · ACCEPT · area o1-D 定稿评论 6913648882 所钉 head;对照 PASS 6910597882(@ b89e3e42),并按维护者拆分规则(#33949 comment 6911407209)核脚本与增长。

Delta 读数:b89e3e42..e06e1a9d 两个提交,16 文件 +37/−3104。其中 −3073 是删除 scripts/codemod-split-registry.mjs;其余全是注释与文本(13 个模块头、changeset 一句、facade-delegation-registry.json 15 条 reason)。git grep codemod-split-registry 在本 head 零命中。无代码行变动。

规则一:一次性脚本不入仓 — 成立。 本 head 树内无该脚本;它只在分支历史(git show b89e3e42:scripts/codemod-split-registry.mjs,blob eb7cc556a0)。我把它取出放回、装上 ts-morph/typescript 后在本 head 亲跑 --verify --base f9120b86:

  • byte-identity: 200/200 moved bodies … 127/127 moved top-level declarations identical;registry.ts 12577 -> 6326 lines;exports-equality: equal — 68 name(s) (55 value(s), 13 type(s));另有恰一行 ✗ registry-facet-hosts.ts is not the generated host module,EXIT=1,与 PR 正文所记一致。
  • 对照腿:只把 registry-facet-hosts.ts 换回 b89e3e42 的字节(差异仅 3 行头注释)再跑 ⇒ EXIT=0。已还原,工作树干净,脚本已删。故唯一的 ✗ 是那段头注释,不是搬移本身。

规则二:增长逐文件点清 — 成立。 净增 +2,657(git diff --numstat f9120b86 HEAD 亲核 9,762/7,105)。我用 PR 正文给的计数脚本在本 head 亲跑,13 个模块逐行与正文表格完全一致(合计 8,780 行 = 搬移文本 6,962 + 头注释 459 + import 156 + facet 包装/重复签名/host 接口/空行 1,203;registry.ts 删而无处复现 138 行)。逐块用途:

  • registry.ts 门面 +849:200 个 stub(保留签名与 docblock,一行转发,codemod 计划读数 800 行)、22 行 import,以及分节注释、重导出名单、static host 块。
  • 13 个新模块 +1,680 净开销:每模块约 35 行头注释(记搬出成员与裁决出处)、各自 import、facet 类包装,以及 static 方法重复的签名(stub 那侧也保留签名)、registry-facet-hosts.ts 的 host 接口。
  • 非代码 +128:facade-delegation-registry.json +117(1 门面行、15 条例外行、1 条上限行)、changeset +10、门禁 watch hint +1;一个测试文件 5 个 key 改址(±5,无断言变动)。
    每块都有出处,无未解释的增量。增长主要来自「签名两处各留一份」与模块头,这是本拆分形态(与 engine.ts 拆分同形)的固有代价,不是夹带。

门禁 check-runs(head e06e1a9d):55 条,success 或 skipped,零 failure、零 pending;Lint & Repo Gates、TypeScript Type Check、Test Core (1/8)…(8/8)(最后一片 09:58Z 收)皆 success。本地套件读数在 b89e3e42,本 head 以 CI 为准(其后只动注释与删脚本)。

其他:首行 Part of #33949,正确(8 拆分之 1,卡不应关)。changeset 改写那句与 diff 一致。## Acceptance notes 两条已有去向(members pass 另卡;main 上旧 codemod-split-*.mjs 由 #34345 删)。

落地条款:改动 >3,000 行 ⇒ 终局四件套,区线程 ⛔ 不落,交席位照 SKILL.md〈路径分叉〉①–④ 交棒(待维护者批准)。head 再移 ⇒ 只读 delta。

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-project-manager · session_01FEkQ5pmEYLVFDcQ1Z1CS8H

维护者速读

Head-sha: e06e1a9d536524d73485a1c916f14f8db52c7c4a

  • 改了什么:把 objectql 的 registry.ts(12,577 行)按章节拆成 13 个模块,registry.ts 留作转发入口(剩 6,326 行),并给它登记行数上限 6,426。对外导出一个不少、种类不变,只搬代码、不改行为。拆分脚本不进仓库,只在分支历史(b89e3e42b8)里供核验。
  • 为什么改:落实 [Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 裁决(6897467376)第 1 条「热点文件逐个拆,registry.ts 第一个」和第 2 条「已拆文件设窄上限」。这个文件是并发 PR 冲突最多的地方之一。
  • 风险与回滚:风险只在「搬家是否一字不差」。席位在本 head 亲跑了历史里的核验脚本:200/200 方法体、127/127 顶层声明与 main 逐字节相同,68 个导出名与种类不变。净增约 2,650 行(桩、模块头和导入),正文逐文件列了来源。回滚就是 revert 本 PR。
  • 先看:① 正文「Growth account」表;② scripts/facade-delegation-registry.json 新增的 facade、15 行例外与 1 行上限;③ packages/objectql/src/registry.ts 的转发形态。
  • 两分钟验证:分支根目录执行 git show b89e3e42b8:scripts/codemod-split-registry.mjs > scripts/codemod-split-registry.mjs; node scripts/codemod-split-registry.mjs --verify --base $(git merge-base HEAD origin/main); rm scripts/codemod-split-registry.mjs,预期 byte-identity: 200/200 … 127/127、exports-equality: equal,外加一行已解释的 ✗(registry-facet-hosts.ts 头注释改过措辞)。
  • 需要你做的:对 head e06e1a9d 点 Approve(超过 3,000 行,按大小定为 Tier H;无契约面,不欠 L2;L1 delta ACCEPT 6913843160)。批准后由席位落地。

席位意见:建议批准。我在本 head 跑了核验,读数与正文一致;脚本删除后 packages/objectql/src 的改动全是注释行(非注释改动 0 行)。裁决要求的两个落地前提现在都成立:没有其他 open PR 改 registry.ts,merge-base 之后 main 也没动过它。

席位核对

  1. 形态:18 个文件,+9,762/−7,105,超 3,000 行。check-governed-merges --pr 34285:无受管路径命中,按大小走人工批准终局。Clause-②: no,Metadata-protocol: none,changeset 为 @objectstack/objectql patch。
  2. 前提实测:在 head e06e1a9d 的工作树里跑 codemod-split-registry.mjs --verify(脚本取自 b89e3e42b8):byte-identity 200/200 与 127/127,exports-equality equal(68 个名字:55 值、13 类型),唯一的 ✗ 是正文说明过的 registry-facet-hosts.ts 头注释。git diff b89e3e42b8 HEAD -- packages/objectql/src 的非注释改动 0 行。
  3. 门禁 check-runs:head e06e1a9d 上 37 success、18 skipped,无失败;mergeable_state clean。
  4. 接受的偏差:净增 +2,657 行,正文 Growth account 逐文件列出来源,符合拆分规则([Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 comment 6911407209)。
  5. 范围外去向:[Decision] next codemod splits for the large hot files, in order, and whether to name a shrink-only line ceiling (hot-file card F) #33949 的另外七个拆分留在卡上(PR 写的是 Part of #33949),按裁决顺序一次一个。Skills-docs: none(不改元数据作者可写的内容)。
  6. 落地条款:等 GOVERNED_APPROVERS 的 APPROVED(或维护者直接合并)。按裁决 6897467376,落地前席位重读:没有其他 open PR 改 registry.ts,且 merge-base 之后 main 没改过它;若有改动,先由 o1-D 在新 main 上重新生成拆分。之后清 pm:awaiting-merge、ready、开 auto-merge;head 若再移动,撤掉挂签回到等待。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 16, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 16, 2026 13:07
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 6080387 Nov 16, 2026
61 checks passed
@os-zhuang
os-zhuang deleted the claude/area-E1-33949-registry branch November 16, 2026 13:47
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants